<template>
	<div class="dianji">
		
		<div class="dianji_content">
			<div class="list">
				<span class="_span">{{title}}</span>
			</div>
			<div class="text">
				<p class="title">{{title}}</p>
				<p class="content">{{desc}}</p>
			</div>
		</div>
		<div class="zhangjie" v-for="(item,index) in shiciList" @click="jump(item.title)">
			<div class="text">
				<p class="title">{{item.title}}</p>
			</div>
		</div>
	</div>
</template>

<script>
	export default {

		data() {
			return {
				title: "",
				desc: "",
				top: false,
				pageNum: 0,
				pageSize: 30,
				moreText: '加载中...',
				shiciList: [],
				titles:[],
			}
		},
		
		onLoad(options) {
			this.title = options.name;
			this.desc = options.desc;
			this.list()
		},
		onShareAppMessage(res) {
			wx.showShareMenu({
				withShareTicket: true,
				menus: ['shareAppMessage', 'shareTimeline']
			})
			return {
				title: this.title,
				imageUrl: 'https://www.leedong.top/img/11556.png',
				path: '/pageB/daodejing/daodejing?name=' + this.title + '&desc=' + this.desc
			}
		
		},
		//2.分享到朋友圈
		onShareTimeline() {
		
			return {
				title: this.title,
				imageUrl: 'https://www.leedong.top/img/11556.png',
				path: '/pageB/daodejing/daodejing?name=' + this.title + '&desc=' + this.desc
		
			}
		},
		methods: {
			jump(name){
				
				uni.navigateTo({
					url:'/pageB/daodejing/daodejingdetails/daodejingdetails?content='+name
				})
			},
			async list() {
				let arr=[];
				let title=[]
				const data = await this.$api.daodejing({
					content:''
				});
				this.shiciList=data.rows;
			},
	

		}
	}
</script>

<style lang="scss">
	.dianji {

		.dianji_content {

			margin-top: 20px;
			border-bottom: 1px solid #ffdcdc;
			margin-bottom: 10px;

			.list {
				width: 22%;
				height: 130px;
				float: left;
				background-image: url('https://www.leedong.top/img/dianji1.png');
				background-size: 100% 100%;

				._span {
					writing-mode: tb-rl;
					padding-left: 12px;
					padding-top: 21px;
					font-size: 12px;
					font-weight: 800;
				}
			}

			.text {

				padding-left: 20px;

				.title {
					color: $color;
					font-size: 30rpx;
					
				}

				.content {
					font-size: 25rpx;
					line-height: 18px;
					color: #616161;

					padding-top: 10px;
					text-indent: 4ch;


				}
			}
		}

		.zhangjie {
			margin-top: 10px;
			border-bottom: 1px solid #f5f5f5;

			.title {
				font-size: 28rpx;
				font-weight: 800;
				color: #7d8468;
			    padding-left: 30px;
			    height: 34px;
			    line-height: 34px;

			}

			.content {
				font-size: 25rpx;
				padding-top: 10rpx;
				line-height: 18px;
				text-indent: 4ch;
				color: #616161;
				padding-bottom: 20rpx;
			}
		}
	}
</style>